package com.etc.controller;

import com.etc.entity.User;
import com.etc.service.ShiorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.ui.Model;

import javax.servlet.http.HttpSession;


@Controller
@RequestMapping("/chat")
public class ChatController {
    @Autowired
    @Qualifier(value = "shior")
    private ShiorService shiorService;

    @RequestMapping(value = "/chatroom",method = RequestMethod.GET)
    public String chatroom(Model model, HttpSession session){
       User user= (User)session.getAttribute("user");
        model.addAttribute("user",user);
        return "ChatRoom";
    }








}
